﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MuseumOwner.master" AutoEventWireup="true"
    CodeFile="TourDetails.aspx.cs" Inherits="TourDetails" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/javascript">
        function numbersonly(e) {
            var unicode = e.charCode ? e.charCode : e.keyCode
            if (unicode != 8) { //if the key isn't the backspace key (which we should allow)
                if (unicode < 48 || unicode > 57) //if not a number
                    return false //disable key press
            }
        }
        function Validate() {
            if (document.getElementById("<%=txtArtName.ClientID%>").value == "") {
                alert("Art Name can not be blank.");
                document.getElementById("<%=txtArtName.ClientID%>").focus();
                return false;
            }
            //        if (document.getElementById("<%=txtArtistName.ClientID%>").value == "") {
            //            alert("Artist Name can not be blank.");
            //            document.getElementById("<%=txtArtistName.ClientID%>").focus();
            //            return false;
            //        }
            //        if (document.getElementById("<%=txtGallery.ClientID%>").value == "") {
            //            alert("Gallery can not be blank.");
            //            document.getElementById("<%=txtGallery.ClientID%>").focus();
            //            return false;
            //        }
            //        if (document.getElementById("<%=txtStop.ClientID%>").value == "") {
            //            alert("Stop can not be blank.");
            //            document.getElementById("<%=txtStop.ClientID%>").focus();
            //            return false;
            //        }
            //        if (document.getElementById("<%=txtFloor.ClientID%>").value == "") {
            //            alert("Floor can not be blank.");
            //            document.getElementById("<%=txtFloor.ClientID%>").focus();
            //            return false;
            //        }
            if (document.getElementById("<%=txtArtDescription.ClientID%>").value == "") {
                alert("Art Description can not be blank.");
                document.getElementById("<%=txtArtDescription.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=fileUploadArtImage1.ClientID%>").value == "" &&
        document.getElementById("<%=lblImage1.ClientID%>").value == "") {
                alert("Please select at least first Art Image.");
                document.getElementById("<%=fileUploadArtImage1.ClientID%>").focus();
                return false;
            }
            return true;
        }
    </script>

    <table width="100%" cellspacing="3" cellpadding="3" border="0">
        <tr>
            <td colspan="3" align="center">
                <b style="font-size: x-large;">Tour Details</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblMuseumName" Text="Museum" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlMuseum" runat="server" Width="200px" DataTextField="MuseumName"
                    DataValueField="MuseumID" AutoPostBack="true" OnSelectedIndexChanged="ddlMuseum_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCategory" Text="Category" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlCategory" runat="server" Width="200px" DataTextField="CategoryName"
                    DataValueField="CategoryID">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblArtName" Text="Art Name" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtArtName" runat="server" Width="200px" MaxLength="250">
                </asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblArtistName" Text="Artist Name" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtArtistName" runat="server" Width="200px" MaxLength="250"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblGallery" Text="Gallery" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtGallery" runat="server" Width="100px" MaxLength="250"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblStop" Text="Stop" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtStop" runat="server" Width="100px" onkeypress="return numbersonly(event)"
                    MaxLength="3"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblFloor" Text="Floor" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtFloor" runat="server" Width="200px" onkeypress="return numbersonly(event)"
                    MaxLength="3"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblArtDescription" Text="Art Description" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtArtDescription" runat="server" Rows="4" TextMode="MultiLine"
                    Width="200px" MaxLength="1000"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblArtImage" Text="Image 1" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:FileUpload ID="fileUploadArtImage1" runat="server" Width="200px" />
                <asp:Label ID="lblArtAsset1" runat="server" Visible="false" Text="0" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:TextBox ID="lblImage1" runat="server" Wrap="true" ReadOnly="true" TextMode="MultiLine"
                    BorderStyle="None" BorderWidth="0" Width="400px" Rows="1" Style="overflow: auto;
                    resize: none;" />
                <span onclick="return confirm('Are you sure to Delete the file?')">&nbsp;&nbsp;&nbsp;<asp:LinkButton
                    ID="lnkbtnDeleteImage1" runat="server" Text="Delete" OnClick="lnkbtnDeleteImage1_Click"></asp:LinkButton>
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblArtImage2" Text="Image 2" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:FileUpload ID="fileUploadArtImage2" runat="server" Width="200px" />
                <asp:Label ID="lblArtAsset2" runat="server" Visible="false" Text="0" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="lblImage2" runat="server"
                    Wrap="true" ReadOnly="true" TextMode="MultiLine" BorderStyle="None" BorderWidth="0"
                    Width="400px" Rows="1" Style="overflow: auto; resize: none;" />
                <span onclick="return confirm('Are you sure to Delete the file?')">&nbsp;&nbsp;&nbsp;<asp:LinkButton
                    ID="lnkbtnDeleteImage2" runat="server" Text="Delete" OnClick="lnkbtnDeleteImage2_Click"></asp:LinkButton>
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label2" Text="Image 3" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:FileUpload ID="fileUploadArtImage3" runat="server" Width="200px" />
                <asp:Label ID="lblArtAsset3" runat="server" Visible="false" Text="0"></asp:Label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="lblImage3" runat="server"
                    Wrap="true" ReadOnly="true" TextMode="MultiLine" BorderStyle="None" BorderWidth="0"
                    Width="400px" Rows="1" Style="overflow: auto; resize: none;" />
                <span onclick="return confirm('Are you sure to Delete the file?')">&nbsp;&nbsp;&nbsp;<asp:LinkButton
                    ID="lnkbtnDeleteImage3" runat="server" Text="Delete" OnClick="lnkbtnDeleteImage3_Click"></asp:LinkButton>
                </span>
            </td>
            <tr>
                <td>
                    <asp:Label ID="Label3" Text="Image 4" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:FileUpload ID="fileUploadArtImage4" runat="server" Width="200px" />
                    <asp:Label ID="lblArtAsset4" runat="server" Visible="false" Text="0"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="lblImage4" runat="server"
                        Wrap="true" ReadOnly="true" TextMode="MultiLine" BorderStyle="None" BorderWidth="0"
                        Width="400px" Rows="1" Style="overflow: auto; resize: none;" />
                    <span onclick="return confirm('Are you sure to Delete the file?')">&nbsp;&nbsp;&nbsp;<asp:LinkButton
                        ID="lnkbtnDeleteImage4" runat="server" Text="Delete" OnClick="lnkbtnDeleteImage4_Click"></asp:LinkButton>
                    </span>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label4" Text="Image 5" runat="server"></asp:Label>
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:FileUpload ID="fileUploadArtImage5" runat="server" Width="200px" />
                    <asp:Label ID="lblArtAsset5" runat="server" Visible="false" Text="0"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="lblImage5" runat="server"
                        Wrap="true" ReadOnly="true" TextMode="MultiLine" BorderStyle="None" BorderWidth="0"
                        Width="400px" Rows="1" Style="overflow: auto; resize: none;" />
                    <span onclick="return confirm('Are you sure to Delete the file?')">&nbsp;&nbsp;&nbsp;<asp:LinkButton
                        ID="lnkbtnDeleteImage5" runat="server" Text="Delete" OnClick="lnkbtnDeleteImage5_Click"></asp:LinkButton>
                    </span>
                </td>
            </tr>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblArtAudio" Text="Audio" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:FileUpload ID="fileUploadAudio" runat="server" Width="200px" />
                <asp:Label ID="lblArtAsset6" runat="server" Visible="false" Text="0"></asp:Label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="lblImage6" runat="server"
                    Wrap="true" ReadOnly="true" TextMode="MultiLine" BorderStyle="None" BorderWidth="0"
                    Width="400px" Rows="1" Style="overflow: auto; resize: none;" />
                <span onclick="return confirm('Are you sure to Delete the file?')">&nbsp;&nbsp;&nbsp;<asp:LinkButton
                    ID="lnkbtnDeleteAudio" runat="server" Text="Delete" OnClick="lnkbtnDeleteAudio_Click"></asp:LinkButton>
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblArtVideo" Text="Video" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:FileUpload ID="fileUploadVideo" runat="server" Width="200px" />
                <asp:Label ID="lblArtAsset7" runat="server" Visible="false" Text="0"></asp:Label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="lblImage7" runat="server"
                    Wrap="true" ReadOnly="true" TextMode="MultiLine" BorderStyle="None" BorderWidth="0"
                    Width="400px" Rows="1" Style="overflow: auto; resize: none;" />
                <span onclick="return confirm('Are you sure to Delete the file?')">&nbsp;&nbsp;&nbsp;<asp:LinkButton
                    ID="lnkbtnDeleteVideo" runat="server" Text="Delete" OnClick="lnkbtnDeleteVideo_Click"></asp:LinkButton>
                </span>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnSubmit" Text="Submit" runat="server" OnClick="btnSubmit_Click"
                    OnClientClick="return Validate();" />&nbsp;&nbsp;
                <asp:Button ID="btnReset" Text="Reset" runat="server" OnClick="btnReset_Click" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Visible="true"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
